{layout name="layout/default" /}
<div class="panel panel-default panel-intro">
  <div class="panel-heading">
    <div class="panel-lead"><em>{$nav_title.title}</em>{$nav_title.remark}</div>
  </div>
  <div class="panel-body">
    <div id="myTabContent" class="tab-content">
      <div class="tab-pane fade active in">
        <div class="widget-body no-padding">
          <div class="bootstrap-table">
            <div class="fixed-table-toolbar">
              <div class="bs-bars pull-left">
                <div id="toolbar" class="toolbar">
                <a href="{:admin_url('admin/data/index',array('type'=>'export'))}" class="btn btn-primary ajax-url"><i class="fa fa-refresh"></i> </a> <a id="export" class="btn btn-success btn-disabled btn-add disabled" href="javascript:;" autocomplete="off"><i class="fa fa-floppy-o"></i> 立即备份</a> 
                <a href="{:admin_url('admin/data/index',array('type'=>'import'))}" class="btn btn-info"><i class="fa fa-stop-circle-o"></i> 数据还原</a> 
                <a  url="{:admin_url('admin/data/repair')}" target-form="tables" class="confirm btn btn-warning btn-disabled ajax-post disabled"><i class="fa fa-exclamation-circle"></i> 修复表</a> 
                <a  url="{:admin_url('admin/data/optimize')}" target-form="tables" class="confirm btn btn-danger btn-del btn-disabled ajax-post disabled"><i class="fa fa-futbol-o"></i> 优化表</a> 
                
                <a  url="{:admin_url('admin/data/clearall')}" target-form="tables" class="confirm btn btn-danger btn-del btn-disabled ajax-post"><i class="fa fa-trash"></i> 清空数据重新开站</a> 
                <span id="selectedChks" style="display:none">已选择<strong></strong>记录</span> </div>
              </div>
            </div>
          </div>
          <div class="fixed-table-container" style="padding-bottom: 0px;">
            <div class="fixed-table-body" id="contents">
            <form class="tables" id="export-form" action="{:admin_url('admin/data/export')}">
              <table id="table" class="table table-striped table-bordered table-hover" style="margin-top: 0px;" width="100%">
                <thead>
                  <tr style="height:45px;">
                    <th class="bs-checkbox" style="text-align:center;vertical-align: middle;"><input name="chkall" type="checkbox" id="chkall"></th>
                    <th  style="text-align:center;vertical-align: middle;">表名</th>
                    <th  style="text-align:center;vertical-align: middle;">表名信息</th>
                    <th style="text-align:center;vertical-align: middle;">数据量</th>
                    <th style="text-align:center;vertical-align: middle;">数据大小</th>
                    <th style="text-align:center;vertical-align: middle;">创建时间</th>
                    <th style="text-align:center;vertical-align: middle;">状态</th>
                    <th style="text-align:center;vertical-align: middle;">操作</th>
                  </tr>
                </thead>
                <tbody>
                
                {volist name="list" id="table"}
                <tr>
                  <td class="bs-checkbox" style="text-align:center;vertical-align: middle;"><input name="tables[]" type="checkbox" value="{$table.name}" id="checkbox" title="{$table.name}" class="ids"></td>
                  <td style="text-align:center;vertical-align:middle;">{$table.name}</td>
                  <td style="text-align:center;vertical-align:middle;">{$table.comment}</td>
                  <td style="text-align:center;vertical-align:middle;">{$table.rows}</td>
                  <td style="text-align:center;vertical-align:middle;">{$table.data_length|format_bytes}</td>
                  <td style="text-align:center;vertical-align:middle;">{$table.create_time}</td>
                  <td style="text-align:center;vertical-align:middle;background-color: #d9edf7;" class="info">未备份</td>
                  <td style="text-align:center;vertical-align: middle;"><a class="btn btn-info btn-xs ajax-get" url="{:admin_url('admin/data/optimize',array('tables'=>$table['name']))}"><i class="fa fa-futbol-o"></i> 优化表</a>&nbsp; <a class="btn btn-warning btn-xs ajax-get" url="{:admin_url('admin/data/repair',array('tables'=>$table['name']))}"><i class="fa fa-exclamation-circle"></i> 修复表</a>&nbsp; <a class="confirm btn btn-danger btn-xs ajax-get" url="{:admin_url('admin/data/clear',array('tables'=>$table['name']))}"><i class="fa fa-trash-o"></i> 清空表</a></td>   
                </tr>
                {/volist}
                </tbody>
              </table>
              </form>
            </div>
          </div>
        </div>
        <div class="clearfix"></div>
      </div>
    </div>
  </div>
</div>
</div>
